<?php

/*

cmsMethod: GetDescriptionById  <is:method call="GetDescriptionById" params="id='documentid'" />

 * attributes:
 * id   Id des Documents
*/

require_once($GLOBALS['cfgPaths']['lib']."cms/cmsMethod.o.inc.php");

class getdescriptionbyid extends cmsMethod
{

  // $params:: name
  function performAction ($params)
  {
    global $docs;
    $doc_id = $params['id'];
    $this->registerRelation($doc_id);
    $doc = $docs->getByID($doc_id);
    return (!empty($doc['descr']))?$doc['descr']:$doc['name'];
  }

}

?>